<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta name="Content-Type" content="text/html; charset=UTF-8" />
<title>Module: Sass::SCSS::RX</title>
<link rel="stylesheet" href="style.css" tppabs="http://sass-lang.com/docs/yardoc/css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="common.css" tppabs="http://sass-lang.com/docs/yardoc/css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '../..';
  if (relpath != '') relpath += '/';
</script>
<script type="text/javascript" charset="utf-8" src="jquery.js" tppabs="http://sass-lang.com/docs/yardoc/js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="app.js" tppabs="http://sass-lang.com/docs/yardoc/js/app.js"></script>

  </head>
  <body>
    <script type="text/javascript" charset="utf-8">
      if (window.top.frames.main) document.body.className = 'frames';
    </script>
    
    <div id="header">
      <div id="menu">
  
    <a href="_index.html" tppabs="http://sass-lang.com/docs/yardoc/_index.html">Index (R)</a> &raquo; 
    <span class='title'><a href="Sass-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass.html" title="Sass (module)">Sass</a></span> &raquo; <span class='title'><a href="SCSS.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/SCSS.html" title="Sass::SCSS (module)">SCSS</a></span>
     &raquo; 
    <span class="title">RX</span>
  
  
  <div class="noframes"><span class="title">(</span><a href="javascript:if(confirm(%27http://sass-lang.com/docs/yardoc/Sass/SCSS/.  \n\nThis file was not retrieved by Teleport Pro, because the server reports that this file cannot be found.  \n\nDo you want to open it from the server?%27))window.location=%27http://sass-lang.com/docs/yardoc/Sass/SCSS/.%27" tppabs="http://sass-lang.com/docs/yardoc/Sass/SCSS/." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  <a id="class_list_link" href="#">Class List</a>
  <a id="method_list_link" href="#">Method List</a>
  <a id ="file_list_link" href="#">File List</a>
</div>

      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><h1>Module: Sass::SCSS::RX 
  
  
</h1>

<dl class="box">
  
  
    
  
    
  
  
    <dt class="r1 last">Defined in:</dt>
    <dd class="r1 last">/var/www/sass-pages/.sass/lib/sass/scss/rx.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>A module containing regular expressions used for lexing tokens in an SCSS document. Most of these are taken from <a href="javascript:if(confirm(%27http://www.w3.org/TR/css3-syntax/  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?%27))window.location=%27http://www.w3.org/TR/css3-syntax/#lexical%27" tppabs="http://www.w3.org/TR/css3-syntax/#lexical">the CSS3 spec</a>, although some have been modified for various reasons.</p>

  </div>
</div>
<div class="tags">
  
</div>
  <h2>Constant Summary</h2>
  



  <h2>Class Method Summary</h2>

  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#escape_ident-class_method" title="escape_ident (class method)">+ (String) <strong>escape_ident</strong>(str) </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc">Takes a string and returns a CSS identifier that will have the value of the given string.</span>
  
</li>

    
  </ul>


  <div id="class_method_details" class="method_details_list">
    <h2>Class Method Details</h2>
    
    
      <div class="method_details first">
  <p class="signature first" id="escape_ident-class_method">
  
    + (<tt>String</tt>) <strong>escape_ident</strong>(str) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>Takes a string and returns a CSS identifier that will have the value of the given string.</p>

  </div>
</div>
<div class="tags">
  <h3>Parameters:</h3>
<ul class="param">
  
    <li>
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
        <span class='name'>str</span>
      
      
      
        &mdash;
        The string to escape
      
    </li>
  
</ul>
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
      
        &mdash;
        The escaped string
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


13
14
15
16
17
18
19
20
21
22
23
24
25
26</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/scss/rx.rb', line 13</span>

def self.escape_ident(str)
  return "" if str.empty?
  return "\\#{str}" if str == '-' || str == '_'
  out = ""
  value = str.dup
  out << value.slice!(0...1) if value =~ /^[-_]/
  if value[0...1] =~ NMSTART
    out << value.slice!(0...1)
  else
    out << escape_char(value.slice!(0...1))
  end
  out << value.gsub(/[^a-zA-Z0-9_-]/) {|c| escape_char c}
  return out
end</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>
    
    <div id="footer">
  Generated on Fri Mar  8 20:33:43 2013 by 
  <a href="javascript:if(confirm(%27http://yardoc.org/  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?%27))window.location=%27http://yardoc.org/%27" tppabs="http://yardoc.org/" title="Yay! A Ruby Documentation Tool">yard</a>
  0.5.3 (ruby-1.8.7).
</div>


  <script type="text/javascript">
  var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
  </script>
  <script type="text/javascript">
  try {
  var pageTracker = _gat._getTracker("UA-535380-8");
  pageTracker._trackPageview();
  } catch(err) {}</script>


  </body>
</html>